<?php




//【BASE】基础接口
Route::rule('admin/base/login','admin/Base/login');
Route::rule('admin/base/relogin','admin/Base/relogin');
Route::rule('admin/base/logout','admin/Base/logout');
Route::rule('admin/base/get_configs','admin/Base/getConfigs', 'POST|OPTIONS');
Route::rule('admin/base/get_verify','admin/Base/getVerify', 'POST|OPTIONS');

//【BASE-ADVANCE】基础接口（需要登陆）
Route::rule('admin/user_menu','admin/Menus/getUserMenu', 'GET|OPTIONS');
Route::rule('admin/check_user_rule','admin/Base2/checkUserRule', 'POST|OPTIONS');

Route::rule('scode/check','scodetrace/scode/check', 'GET|OPTIONS');
Route::rule('scode/log','scodetrace/scode/getLog', 'GET|OPTIONS');
Route::rule('tcode/log','scodetrace/TraceLog/getLog','GET|OPTIONS');



//【SYSTEM】系统性管理接口
Route::group(['name'=>'admin','method'=>'POST|OPTIONS'],function(){
	Route::rule('menus/count','Menus/count');
	Route::rule('menus/enables','Menus/enables');
	Route::rule('menus/deletes','Menus/deletes');

	Route::rule('rules/enables','Rules/enables');
	Route::rule('rules/deletes','Rules/deletes');

	Route::rule('groups/enables','Groups/enables');
	Route::rule('groups/deletes','Groups/deletes');

	Route::rule('users/count','Users/count');
	Route::rule('users/enables','Users/enables');
	Route::rule('users/deletes','Users/deletes');

	Route::rule('cache/user_menu','Cache/user_menu');
	Route::rule('cache/system_config','Cache/system_config');
	Route::rule('cache/admin_rule','Cache/admin_rule');
	Route::rule('cache/group_access','Cache/group_access');

})->prefix('admin/');// ->allowCrossDomain();

//【SYSTEM】系统性管理接口2(RESTFul API)
Route::group(['name'=>'admin'],function(){
	Route::resource('menus', 'Menus');
	Route::resource('rules', 'Rules');
	Route::resource('groups', 'Groups');
	Route::resource('users', 'Users');

})->prefix('admin/');

//【BASEINFO】基础信息管理接口
Route::group(['name'=>'baseinfo','method'=>'POST|OPTIONS'],function(){
	Route::rule('product_types/count','ProductTypes/count');
	Route::rule('product_types/deletes','ProductTypes/deletes');

	Route::rule('products/count','products/count');
	Route::rule('products/deletes','products/deletes');

	Route::rule('companies/count','Companies/count');
	Route::rule('companies/deletes','Companies/deletes');

	Route::rule('customers/count','Customers/count');
	Route::rule('customers/deletes','Customers/deletes');

	Route::rule('groups/count','Groups/count');
	Route::rule('groups/deletes','Groups/deletes');

	Route::rule('carriage_codes/deletes','CarriageCodes/deletes');
	Route::rule('carriage_codes/count','CarriageCodes/count');

	Route::rule('areas/count','Areas/count');
	Route::rule('areas/deletes','Areas/deletes');
	Route::rule('areas/get_location','Areas/getLocation');


	Route::rule('agents/count','agents/count');
	Route::rule('agents/deletes','agents/deletes');

	Route::rule('agent_types/count','AgentTypes/count');
	Route::rule('agent_types/deletes','AgentTypes/deletes');

})->prefix('baseinfo/');

//【BASEINFO】基础信息管理接口2(RESTFul API)
Route::group(['name'=>'baseinfo'],function(){
	Route::resource('product_types', 'ProductTypes');
	Route::resource('products', 'Products');

	Route::resource('companies', 'Companies');
	Route::resource('customers', 'Customers');
	Route::resource('groups', 'Groups');
	Route::resource('carriage_codes', 'CarriageCodes');
	Route::resource('areas', 'Areas');
	Route::resource('agents', 'Agents');
	Route::resource('agent_types', 'AgentTypes');

})->prefix('baseinfo/');

//【SCODETRACE】防伪溯源信息管理接口
Route::group(['name'=>'scodetrace','method'=>'POST|OPTIONS'],function(){
	Route::rule('scodes/count','Scodes/count');
	Route::rule('scodes/deletes','Scodes/deletes');
	Route::rule('scodes/enables','Scodes/enables');
	Route::rule('scodes/log_one','Scodes/logOne');

	Route::rule('batches/count','Batches/count');
	Route::rule('batches/deletes','Batches/deletes');
	Route::rule('batches/enables','Batches/enables');
	Route::rule('batches/log_one','Batches/logOne');
	// Route::rule('batches/get_log','Batches/getLog');

	Route::rule('activities/count','Activities/count');
	Route::rule('activities/deletes','Activities/deletes');
	//Route::rule('activities/enables','Activities/enables');


	Route::rule('activity_types/count','Activity_Types/count');
	Route::rule('activity_types/deletes','Activity_Types/deletes');
	Route::rule('activity_types/enables','Activity_Types/enables');

	Route::rule('prizes/count','Prizes/count');
	Route::rule('prizes/deletes','Prizes/deletes');

	Route::rule('trace_logs/count','TraceLogs/count');

	Route::rule('scanner/start_trace_log','Scanner/startTraceLog');
	Route::rule('scanner/exec','Scanner/exec');
})->prefix('scodetrace/');

//【SCODETRACE】防伪溯源信息管理接口2(RESTFul API)
Route::group(['name'=>'scodetrace'],function(){
	Route::resource('scodes', 'Scodes');
	Route::resource('batches', 'Batches');
	Route::resource('activities', 'Activities');
	Route::resource('activity_types', 'ActivityTypes');
	Route::resource('prizes', 'Prizes');
	Route::resource('trace_logs', 'TraceLogs');

})->prefix('scodetrace/');



?>